<html>
    <head>
        <meta name="layout" content="main" />
        <title>WebAlbum : User List</title>
    </head>
    <body>
        <div class="body">
            <h1>User List</h1>
            <g:render template="/shared/creators" />
            <g:render template="/shared/messages" />

            <div class="list">
                <table>
                    <thead>
                        <tr>
                   	        <g:sortableColumn property="name"           title="Name" />
                   	        <g:sortableColumn property="motto"          title="Motto" />
                   	        <g:sortableColumn property="widgetCount"    title="Widgets" />
                   	        <g:sortableColumn property="dateCreated"     title="Joined" />
                        </tr>
                    </thead>
                    <tbody>
                        <g:each in="${list}" status="i" var="user">
                            <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                                <td><g:link action="show" id="${user.id}" title="Show User">${user.name?.encodeAsHTML()}</g:link></td>
                                <td>${user.motto?.encodeAsHTML()}</td>
                                <td><g:formatDate format="dd MMM yyyy HH:mm:ss" date="${user.dateCreated}"/></td>
                            </tr>
                        </g:each>
                    </tbody>
                </table>
            </div>
            <wa:ifPaginate count="${paginateCount}">
                <div class="paginateButtons">
                    <g:paginate total="${paginateCount}" /> &#160;
                </div>
            </wa:ifPaginate>
        </div>
    </body>
</html>
